package com.broadengate.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.broadengate.bean.ContractInfo;
import com.broadengate.bean.ProjectInfo;

public interface IncomeDao<T> extends BaseDao<T> {
    
    /**
     * 根据年份和部门ID获取对应此部门下的当前年下的所有收支表名称列表
     * @param year
     * @param departmentId
     * @return [参数说明]
     * 
     * @return List<String> [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public List<String> getIncomeByYearAndDepartmentId(Map param);
    
    /**
     * 根据收支名称获取收支表收入
     * @param incomeName
     * @return [参数说明]
     * 
     * @return float [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public float getIncomeValueByName(@Param(value="incomeName")String incomeName);
    
    /**
     * 根据收支表名称获取所有此收支表对应的合同列表
     * @param incomeName
     * @return [参数说明]
     * 
     * @return List<ContractInfo> [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public List<ContractInfo> getContractInfoListByIncomeName(@Param(value="incomeName")String incomeName);
    
    /**
     * 根据收入名称获取此收入的详细信息
     * @param incomeName
     * @return [参数说明]
     * 
     * @return ProjectInfo [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public ProjectInfo getIncomeDetail(@Param(value="incomeName")String incomeName);
    
    /**
     * 取消收支 合同关联关系
     * @param param MAP结构，分别为incomeName,contractId
     * @throws Exception [参数说明]
     * 
     * @return void [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public void unRelateContracts(Map param)throws Exception;
    
    /**
     * 收支 合同关联
     * @param param
     * @throws Exception [参数说明]
     * 
     * @return void [返回类型说明]
     * @exception throws [违例类型] [违例说明]
     * @see [类、类#方法、类#成员]
     */
    public void relateContract(Map param) throws Exception;
    
}
